<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>数组中字符串的最大值</title>
</head>
<body>
  <script>
    function fn(strs) {
      let ans = 0;
      for (let s of strs) {
        if (isNaN(Number(s))) {
          ans = Math.max(ans, s.length)
        } else {
          ans = Math.max(ans, Number(s))
        }
      }
      return ans
    }
    console.log(fn(['alic3','bob','3','4','00000']))
  </script>
</body>
</html>